package org.extframework.ld.xml.base;

/**
 * @author : Dong.Li
 * @created : 2013-1-17
 * @version : 1.0
 * @description :
 */
public class DialogItem {

	private String xtype;
	private String name;
	private String fieldLabel;
	private boolean hidden = false;
	private boolean disabled = false;
	private String format;
	private String value;
	private String inputType;
	private boolean allowBlank = true;
	private String blankText;
	private String emptyText;

	public String getXtype() {
		return this.xtype;
	}

	public void setXtype(String xtype) {
		this.xtype = xtype;
	}

	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getFieldLabel() {
		return this.fieldLabel;
	}

	public void setFieldLabel(String fieldLabel) {
		this.fieldLabel = fieldLabel;
	}

	public boolean isHidden() {
		return this.hidden;
	}

	public void setHidden(boolean hidden) {
		this.hidden = hidden;
	}

	public boolean isDisabled() {
		return this.disabled;
	}

	public void setDisabled(boolean disabled) {
		this.disabled = disabled;
	}

	public String getFormat() {
		return this.format;
	}

	public void setFormat(String format) {
		this.format = format;
	}

	public String getValue() {
		return this.value;
	}

	public void setValue(String value) {
		this.value = value;
	}

	public String getInputType() {
		return this.inputType;
	}

	public void setInputType(String inputType) {
		this.inputType = inputType;
	}

	public boolean isAllowBlank() {
		return this.allowBlank;
	}

	public void setAllowBlank(boolean allowBlank) {
		this.allowBlank = !allowBlank;
	}

	public String getBlankText() {
		return this.blankText;
	}

	public void setBlankText(String blankText) {
		if ((!(this.allowBlank))
				&& (((blankText == null) || (blankText.length() == 0)))) {
			this.blankText = this.fieldLabel + "是必填项.";
			return;
		}
		this.blankText = blankText;
	}

	public String getEmptyText() {
		return this.emptyText;
	}

	public void setEmptyText(String emptyText) {
		this.emptyText = emptyText;
	}

}
